//
// Created by wanghaiwei on 2019/12/24.
//
#pragma once
#include <string>
#include <vector>
#include <boost/serialization/string.hpp>
#include <boost/serialization/vector.hpp>

#ifndef LIBDL_CORE_MODULE_KEYS_H
#define LIBDL_CORE_MODULE_KEYS_H

class module_keys {
    friend class boost::serialization::access;

    template<class Archive>
    void serialize(Archive &archive, const unsigned int version) {
        archive & key;
        archive & is_buffer;
        archive & has_children;
        archive & children;
    }

public:
    std::string key;
    bool is_buffer;
    bool has_children;
    std::vector<module_keys> children;
};

#endif //LIBDL_CORE_MODULE_KEYS_H
